import {storage} from "@/zdpui/util/storage.js";

// 对路由做初始化的处理
const initBeforeRouter = (router) => {
    router.beforeEach(async (to, from) => {
        if (!storage.get("token") && to.name !== "/login") {
            return {name: '/login'}
        }
    })
}

export default initBeforeRouter